package com.tedu.springboot13.web.pojo;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class JosnResult {
    private Integer state = 1;
    private String message = "ok";
    private Object data;

    public JosnResult(Integer state, String message, Object data) {
        this.state = state;
        this.message = message;
        this.data = data;
    }

    public JosnResult(Integer state) {
        this.state = state;
    }

    public JosnResult(String message) {
        this.message = message;
    }

    public JosnResult(String message, Object data) {
        this.message = message;
        this.data = data;
    }

    public JosnResult(Integer state, Object data) {
        this.state = state;
        this.data = data;
    }

    public JosnResult(Integer state, String message) {
        this.state = state;
        this.message = message;
    }

    public JosnResult(Object data) {
        this.data = data;
    }

    public JosnResult(Throwable e) {
        this.state = 0;
        this.message = e.getMessage();
    }

    public JosnResult() {
    }

}
